package chloroform

import scaladuct.{Property, ConfigPageGateway}
import chloroform.l10n.ProjectLocale
import argo.jdom._

/**
 * <p>
 * Created by IntelliJ IDEA.
 * User: zslajchrt
 * Date: Jan 19, 2011
 * Time: 8:27:42 PM
 */

trait JsonCookieHandler {
  def getCookieMessageBuilder(gateway: ConfigPageGateway[_]): JsonNodeBuilder[JsonRootNode]
  def updateCookie(gateway: ConfigPageGateway[_], responseMap: java.util.Map[JsonStringNode, JsonNode]): AnyRef
  def getHintsBuilder(gateway: ConfigPageGateway[_], hints: List[Property[Nothing]]): JsonNodeBuilder[JsonRootNode]
  def updateHints(gateway: ConfigPageGateway[_], selectedHint: Property[Nothing], newValue: JsonNode): Property[AnyRef]
  def getResultBuilder(gateway: ConfigPageGateway[_]): JsonNodeBuilder[JsonRootNode]
  def getEndBuilder: JsonNodeBuilder[JsonRootNode]
}

trait JsonProjectHandler {
  def getProjectEntriesBuilder(project: Project with ProjectLocale, scenario: String = null): JsonNodeBuilder[JsonRootNode]
  def getSelectedProjectEntriesBuilder(project: Project with ProjectLocale, entries: List[TypedProjectEntry]): JsonNodeBuilder[JsonRootNode]
}